package com.mvp.shq.washer.ui.recharge;

import com.mvp.shq.washer.base.BaseModel;
import com.mvp.shq.washer.base.BasePresenter;
import com.mvp.shq.washer.base.BaseView;
import com.mvp.shq.washer.entity.RechargeBean;
import com.mvp.shq.washer.entity.WxPayBean;
import com.mvp.shq.washer.entity.result.AlipayResult;
import com.mvp.shq.washer.entity.result.BaseResult;
import com.mvp.shq.washer.entity.RechargeMoney;
import com.mvp.shq.washer.entity.RechargeResponse;

import java.util.List;

import io.reactivex.Observable;

/**
 * Created by Administrator on 2017/8/19.
 */

public interface RechargeConstract {
    interface Model extends BaseModel{
        Observable<BaseResult<List<RechargeMoney>>> rechargeMoney();
        Observable<BaseResult<List<RechargeBean>>> getRechargeMoney();
        Observable<BaseResult<AlipayResult>> recharge(String token, RechargeResponse response);
        Observable<BaseResult<WxPayBean>> wxRecharge(String token, RechargeResponse response);
    };
    interface View extends BaseView{
        void getRecharMoneySuccess(List<RechargeMoney> moneys);
        void getRecharMoneyFail(String msg);
        void alipayS(AlipayResult result);
        void wxPayS(WxPayBean payBean);
        void getRechargeMoneyS(List<RechargeBean> list);
    };
    public abstract class Presenter extends BasePresenter<Model,View>{
        public abstract void getMoney();
        public abstract void getRechageMoney();
        public abstract void alipay(RechargeResponse response);
        public abstract void wxPay(RechargeResponse response);
    }
}
